package notifiers;

import play.*;
import play.libs.Codec;
import play.mvc.*;
import java.util.*;

import org.apache.commons.mail.*;

import models.User;

public class Mails extends Mailer {
	 
	   public static void welcome(User user) {
	      setSubject("Welcome %s", user.firstname + " " + user.lastname);
	      addRecipient(user.email);
	      setFrom("a place to stay <admin@a-place-to-stay.com>");
	      send(user);      
	   }
	 
	   public static void lostPassword(User user, String newPassword) {
	      	  
	      setFrom("a place to stay <admin@a-place-to-stay.com>");
	      setSubject("Your password has been reset");
	      addRecipient(user.email);
	      send(user, newPassword);
	   }
	 
	}